import Vue from 'vue';
import Router from 'vue-router';
import bbsRouter from './bbsRouter'
import media from './media';
Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/dashboard'
        },
        {
            path: '/',
            component: () => import(/* webpackChunkName: "home" */ '../components/common/Home.vue'),
            meta: { title: '自述文件' },
            children: [
                ...bbsRouter,
                ...media,
                {
                    path: '/dashboard',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/Dashboard.vue'),
                    meta: { title: '系统首页' }
                },
                {
                    path: '/sys/user/list',
                    props:{auths:{add:'PERMISSION_USER_ADD',update:'PERMISSION_USER_EDIT',delete:'PERMISSION_USER_DELETE',reset:'PERMISSION_USER_RESET'}},
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/sys/user/UserList.vue'),
                    meta: { title: '账号信息' }
                },
                {
                    path: '/sys/role/list',
                    props:{auths:{add:'PERMISSION_MENU_ADD',update:'PERMISSION_MENU_EDIT',delete:'PERMISSION_MENU_DELETE'}},
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/sys/role/RoleList.vue'),
                    meta: { title: '菜单权限' }
                },
                {
                    path: '/index/advertise/general/list',
                    props:{auths:{add:'INDEX_ADVERTISE_ADD',update:'INDEX_ADVERTISE_EDIT',delete:'INDEX_ADVERTISE_DELETE',down:'INDEX_ADVERTISE_DOWN',up:'INDEX_ADVERTISE_UP'}},
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/index/advertise/AdvertiseList.vue'),
                    meta: { title: '首页普通广告' }
                },
                {
                    path: '/index/advertise/general/add',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/index/advertise/AdvertiseAdd.vue'),
                    meta: { title: '新增首页普通广告' }
                },
                {
                    path: '/index/advertise/general/edit/:id',
                    props:true,
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/index/advertise/AdvertiseEdit.vue'),
                    meta: { title: '编辑首页普通广告' }
                },
                {
                    path: '/index/advertise/general/detail/:id',
                    props:true,
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/index/advertise/AdvertiseDetail.vue'),
                    meta: { title: '首页普通广告详情' }
                },
                {
                    path: '/index/advertise/carousel/list',
                    props:{auths:{add:'INDEX_ADVERTISE_CAROUSEL_ADD',update:'INDEX_ADVERTISE_CAROUSEL_EDIT',delete:'INDEX_ADVERTISE_CAROUSEL_DELETE',down:'INDEX_ADVERTISE_CAROUSEL_DOWN',up:'INDEX_ADVERTISE_CAROUSEL_UP'}},
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/index/carousel/CarouselList.vue'),
                    meta: { title: '首页轮播广告' }
                },
                {
                    path: '/index/advertise/carousel/add',
                        component: () => import(/* webpackChunkName: "table" */ '../components/page/index/carousel/CarouselAdd.vue'),
                    meta: { title: '新增首页轮播广告' }
                },
                {
                    path: '/index/advertise/carousel/edit/:id',
                    props:true,
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/index/carousel/CarouselEdit.vue'),
                    meta: { title: '编辑首页轮播广告' }
                },
                {
                    path: '/index/advertise/carousel/detail/:id',
                    props:true,
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/index/carousel/CarouselDetail.vue'),
                    meta: { title: '首页轮播广告详情' }
                },
                {
                    path: '/module/config/list',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/index/config/ModuleList.vue'),
                    meta: { title: '功能配置' }
                },
                {
                    path: '/hot/list',
                    props:{auths:{add:'INDEX_HOT_ADD',update:'INDEX_HOT_EDIT',delete:'INDEX_HOT_DELETE'}},
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/index/hot/HotList.vue'),
                    meta: { title: '今日热点' }
                },
                {
                    path: '/activity/list',
                    props:{auths:{add:'ACTIVITY_ADD',edit:'ACTIVITY_EDIT',delete:'ACTIVITY_DELETE',detail:'ACTIVITY_DETAIL',applyDetail:'ACTIVITY_APPLY_DETAIL',updateStatus:'ACTIVITY_UPDATE_STATUS'}},
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/activity/ActivityList.vue'),
                    meta: { title: '活动列表' }
                },
                {
                    path: '/activity/add',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/activity/ActivityAdd.vue'),
                    meta: { title: '福利活动添加' }
                },
                {
                    path: '/activity/edit/:id',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/activity/ActivityEdit.vue'),
                    meta: { title: '福利活动编辑' }
                },
                {
                    path: '/activity/detail/:id',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/activity/ActivityDetail.vue'),
                    meta: { title: '福利活动详情' }
                },
                {
                    path: '/activity/apply/:id',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/activity/ActivityApplyList.vue'),
                    meta: { title: '福利活动报名详情' }
                },
                {
                    path: '/lhtUser/list',
                    props:{auths:{setting:'LHT_USER_SETTING',add:'LHT_USER_ADD'}},
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/lhtUser/LhtUserList.vue'),
                    meta: { title: '用户信息' }
                },
                {
                    path: '/mall/goodsDetail/list',
                    // props:{auths:{add:'ACTIVITY_ADD',edit:'ACTIVITY_EDIT',delete:'ACTIVITY_DELETE',detail:'ACTIVITY_DETAIL',applyDetail:'ACTIVITY_APPLY_DETAIL',updateStatus:'ACTIVITY_UPDATE_STATUS'}},
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/mall/goodsDetail/list.vue'),
                    meta: { title: '商品列表' }
                },
                {
                    path: '/mall/goodsDetail/add',
                    // props:{auths:{add:'ACTIVITY_ADD',edit:'ACTIVITY_EDIT',delete:'ACTIVITY_DELETE',detail:'ACTIVITY_DETAIL',applyDetail:'ACTIVITY_APPLY_DETAIL',updateStatus:'ACTIVITY_UPDATE_STATUS'}},
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/mall/goodsDetail/add.vue'),
                    meta: { title: '积分商品添加' }

                },
                {
                    path: '/mall/goodsDetail/edit/:id',
                    // props:{auths:{add:'ACTIVITY_ADD',edit:'ACTIVITY_EDIT',delete:'ACTIVITY_DELETE',detail:'ACTIVITY_DETAIL',applyDetail:'ACTIVITY_APPLY_DETAIL',updateStatus:'ACTIVITY_UPDATE_STATUS'}},
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/mall/goodsDetail/edit.vue'),
                    meta: { title: '积分商品编辑' }
                },
                {
                    path: '/mall/goodsDetail/detail/:id',
                    // props:{auths:{add:'ACTIVITY_ADD',edit:'ACTIVITY_EDIT',delete:'ACTIVITY_DELETE',detail:'ACTIVITY_DETAIL',applyDetail:'ACTIVITY_APPLY_DETAIL',updateStatus:'ACTIVITY_UPDATE_STATUS'}},
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/mall/goodsDetail/detail.vue'),
                    meta: { title: '积分商品编辑' }
                },
                {
                    path: '/mall/seckill/list',
                    // props:{auths:{add:'ACTIVITY_ADD',edit:'ACTIVITY_EDIT',delete:'ACTIVITY_DELETE',detail:'ACTIVITY_DETAIL',applyDetail:'ACTIVITY_APPLY_DETAIL',updateStatus:'ACTIVITY_UPDATE_STATUS'}},
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/mall/seckill/list.vue'),
                    meta: { title: '秒杀列表' }
                },
                {
                    path: '/mall/seckill/add',
                    // props:{auths:{add:'ACTIVITY_ADD',edit:'ACTIVITY_EDIT',delete:'ACTIVITY_DELETE',detail:'ACTIVITY_DETAIL',applyDetail:'ACTIVITY_APPLY_DETAIL',updateStatus:'ACTIVITY_UPDATE_STATUS'}},
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/mall/seckill/add.vue'),
                    meta: { title: '秒杀活动添加' }
                },
                {
                    path: '/mall/seckill/edit/:id',
                    // props:{auths:{add:'ACTIVITY_ADD',edit:'ACTIVITY_EDIT',delete:'ACTIVITY_DELETE',detail:'ACTIVITY_DETAIL',applyDetail:'ACTIVITY_APPLY_DETAIL',updateStatus:'ACTIVITY_UPDATE_STATUS'}},
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/mall/seckill/edit.vue'),
                    meta: { title: '秒杀活动编辑' }
                },
                {
                    path: '/mall/seckill/detail/:id',
                    // props:{auths:{add:'ACTIVITY_ADD',edit:'ACTIVITY_EDIT',delete:'ACTIVITY_DELETE',detail:'ACTIVITY_DETAIL',applyDetail:'ACTIVITY_APPLY_DETAIL',updateStatus:'ACTIVITY_UPDATE_STATUS'}},
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/mall/seckill/detail.vue'),
                    meta: { title: '秒杀活动详情' }
                },
                {
                    path: '/mall/selectGoods/list',
                    // props:{auths:{add:'ACTIVITY_ADD',edit:'ACTIVITY_EDIT',delete:'ACTIVITY_DELETE',detail:'ACTIVITY_DETAIL',applyDetail:'ACTIVITY_APPLY_DETAIL',updateStatus:'ACTIVITY_UPDATE_STATUS'}},
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/mall/selectGoods/list.vue'),
                    meta: { title: '星选列表' }
                },
                {
                    path: '/mall/selectGoods/add',
                    // props:{auths:{add:'ACTIVITY_ADD',edit:'ACTIVITY_EDIT',delete:'ACTIVITY_DELETE',detail:'ACTIVITY_DETAIL',applyDetail:'ACTIVITY_APPLY_DETAIL',updateStatus:'ACTIVITY_UPDATE_STATUS'}},
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/mall/selectGoods/add.vue'),
                    meta: { title: '星选商品添加' }
                },
                {
                    path: '/mall/selectGoods/edit/:id',
                    // props:{auths:{add:'ACTIVITY_ADD',edit:'ACTIVITY_EDIT',delete:'ACTIVITY_DELETE',detail:'ACTIVITY_DETAIL',applyDetail:'ACTIVITY_APPLY_DETAIL',updateStatus:'ACTIVITY_UPDATE_STATUS'}},
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/mall/selectGoods/edit.vue'),
                    meta: { title: '星选商品编辑' }
                },
                {
                    path: '/mall/selectGoods/detail/:id',
                    // props:{auths:{add:'ACTIVITY_ADD',edit:'ACTIVITY_EDIT',delete:'ACTIVITY_DELETE',detail:'ACTIVITY_DETAIL',applyDetail:'ACTIVITY_APPLY_DETAIL',updateStatus:'ACTIVITY_UPDATE_STATUS'}},
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/mall/selectGoods/detail.vue'),
                    meta: { title: '星选商品详情' }
                },
                {
                    path: '/mall/order/list',
                    // props:{auths:{add:'ACTIVITY_ADD',edit:'ACTIVITY_EDIT',delete:'ACTIVITY_DELETE',detail:'ACTIVITY_DETAIL',applyDetail:'ACTIVITY_APPLY_DETAIL',updateStatus:'ACTIVITY_UPDATE_STATUS'}},
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/mall/order/list.vue'),
                    meta: { title: '订单列表' }
                },
                {
                    path: '/mall/order/detail/:id',
                    // props:{auths:{add:'ACTIVITY_ADD',edit:'ACTIVITY_EDIT',delete:'ACTIVITY_DELETE',detail:'ACTIVITY_DETAIL',applyDetail:'ACTIVITY_APPLY_DETAIL',updateStatus:'ACTIVITY_UPDATE_STATUS'}},
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/mall/order/detail.vue'),
                    meta: { title: '订单详情' }
                },
                {
                    path: '/safeguard/list',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/safeguard/SafeGuardList.vue'),
                    meta: { title: '维权管理' }
                }
            ]
        },
        {
            path: '/login',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/Login.vue')
        }
    ]
});
